<h1>Daftar Produk Belanja Bulanan</h1>
<?php
$this->renderPartial('application.modules.member.views.ewallet.info_ewallet_products', array(
    'total_price' => $total_price,
));
?>
<br />
<form name="transaction" method="post">
    <div class="list">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <th width="10">&nbsp;</th>
                <th width="10">No.</th>
                <th width="50">Kode</th>
                <th>Produk</th>
                <th width="100">Harga</th>
                <th width="100">BV</th>
            </tr>
            <?php
            if ($products != false) {
                $no = 1;
                foreach ($products as $row_products) {
                    $disabled = ($row_products['products_price'] <= $_SESSION['ewallet_products']['saldo_available']) ? '' : 'disabled';
                    echo '<tr>';
                    //echo '<td align="center"><input type="checkbox" name="item[' . $no . ']" value="' . $row_products['products_id'] . '" '.$disabled.' /></td>';
                    echo '<td align="center"><input type="radio" name="add" value="' . $row_products['products_id'] . '" ' . $disabled . ' /></td>';
                    echo '<td align="right">' . $no . '.</td>';
                    echo '<td align="center">' . $row_products['products_code'] . '</td>';
                    echo '<td>';
                    echo '<strong>' . $row_products['products_name'] . '</strong>';
                    if ($row_products['products_description'] != '') {
                        echo '<p>' . $row_products['products_description'] . '</p>';
                    }
                    echo '</td>';
                    echo '<td align="right">' . number_format($row_products['products_price']) . '</td>';
                    echo '<td align="right">' . number_format($row_products['products_bv']) . '</td>';
                    echo '</tr>';
                    $no++;
                }
                echo '<tr>';
                echo '<th colspan="6" style="text-align:right;"><input type="submit" name="addcart" value="Masukkan Keranjang Belanja" class="button" /></th>';
                echo '</tr>';
            } else {
                echo '<tr><td colspan="6" align="center">-----====-----</td></tr>';
            }
            ?>
        </table>
    </div>
</form>
<br /><br />
<?php
$this->renderPartial('auto_cart', array(
    'cart' => $cart,
    'total_quantity' => $total_quantity,
    'total_price' => $total_price,
));
?>